#!/bin/bash
# Manual   -- https://gnutsoftware.com/themes/gnut/assets/files/anubis_tutorial.pdf?v3
# Tutorial -- https://gnutsoftware.com/themes/gnut/assets/files/anubis_manual.pdf?v3
rnxobs=$1
if [ -z "$rnxobs" ]; then
    echo "Usage: script_Anubis.sh <rnxobs> [rnxnav] ..."
    exit 0
fi
shift
rnxnav="$@"
obsnam="${rnxobs%.*}"
if [ "$rnxnav" ]; then
    Anubis      :inp:rinexo $rnxobs          \
                :inp:rinexn $rnxnav          \
                :nav:chk_health="true"       \
                :qc:use_health="statistics"  \
                :qc:sec_snr="9"              \
                :out:xtr $obsnam.xtr         \
                :out:xml $obsnam.xml         \
                -z config.xml
else
    Anubis      :inp:rinexo $rnxobs          \
                :qc:use_health="statistics"  \
                :qc:sec_snr="9"              \
                :out:xtr $obsnam.xtr         \
                :out:xml $obsnam.xml         \
                -z config.xml
fi
plot_Anubis.pl  --ifile $obsnam.xtr          \
                --title $obsnam              \
                --plot $obsnam.eps           \
                --all                        \
                --all
